package com.suray.wcs.service.enums;

public enum RunForGCodeStatus {
    INVALID(0, "未检测"),
    PASS(1, "检测完成"),
    FAIL(2, "检测异常"),
    ;

    int value;
    String description;
    RunForGCodeStatus(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public static RunForGCodeStatus parseValue(int value) {
        for (RunForGCodeStatus runForGCodeStatus : RunForGCodeStatus.values()) {
            if (runForGCodeStatus.value == value) {
                return runForGCodeStatus;
            }
        }

        return INVALID;
    }

    public int getValue() {
        return value;
    }
}
